------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\Stijn\Documents\_Projects_\Research\Papers\Prestatieanalyse\Persistence_in_Top\Analyse\130401_ReStat_scripts_data\su
> bmitted_to_ReStat\pubanalysis.log
  log type:  text
 opened on:   8 Apr 2013, 13:22:51

. 
. use pubdata.dta, clear

. 
. stset end, origin(time max(zapdate,d(01oct1992))) failure(h2y==1) id(persnr) time0(begin) scale(365.25) exit(finalobs==1)

                id:  persnr
     failure event:  h2y == 1
obs. time interval:  (begin, end]
 exit on or before:  finalobs==1
    t for analysis:  (time-origin)/365.25
            origin:  time max(zapdate,d(01oct1992))

------------------------------------------------------------------------------
     7764  total obs.
     1034  obs. begin on or after exit
------------------------------------------------------------------------------
     6730  obs. remaining, representing
     1034  subjects
     1063  failures in multiple failure-per-subject data
 6729.604  total analysis time at risk, at risk from t =         0
                             earliest observed entry t =         0
                                  last observed exit t =  8.999316

. replace _t0=round(_t0)
(4483 real changes made)

. replace _t=round(_t)
(5375 real changes made)

. 
. stcox male age maind_B maind_C maind_E maind_G maind_H maind_I maind_M maind_N maind_P maind_R maind_Z fac_wet fac_twt fac_lbw fac_gen f
> ac_far r_doc1 r_hdoc1 r_hl1 r_rest1 yrsrank headuni1 zapaft92 yrszap tchload cumGOAlag1 cumOTlag1 avgco avgcom fulltiun if prefirst2y==1
>  & pubm_pre92h==0, robust cluster(persnr) /* first top: table 2, model 1 */

         failure _d:  h2y == 1
   analysis time _t:  (end-origin)/365.25
             origin:  time max(zapdate,d(01oct1992))
  exit on or before:  finalobs==1
                 id:  persnr

Iteration 0:   log pseudolikelihood = -870.47502
Iteration 1:   log pseudolikelihood = -810.13875
Iteration 2:   log pseudolikelihood = -804.03287
Iteration 3:   log pseudolikelihood = -803.80977
Iteration 4:   log pseudolikelihood =  -803.8079
Iteration 5:   log pseudolikelihood =  -803.8079
Refining estimates:
Iteration 0:   log pseudolikelihood =  -803.8079

Cox regression -- Breslow method for ties

No. of subjects      =          789                Number of obs   =      4020
No. of failures      =          149
Time at risk         =         4020
                                                   Wald chi2(32)   =    185.01
Log pseudolikelihood =    -803.8079                Prob > chi2     =    0.0000

                               (Std. Err. adjusted for 789 clusters in persnr)
------------------------------------------------------------------------------
             |               Robust
          _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        male |   2.690518   .8753517     3.04   0.002     1.422002    5.090632
         age |   .9218174   .0155542    -4.82   0.000     .8918304    .9528128
     maind_B |   .8936006   .4279996    -0.23   0.814     .3495034    2.284733
     maind_C |   2.764708    1.14193     2.46   0.014     1.230469     6.21195
     maind_E |   2.780532   1.362634     2.09   0.037     1.064109    7.265572
     maind_G |   4.177717   3.712038     1.61   0.108     .7321816    23.83742
     maind_H |   5.178352   2.503787     3.40   0.001     2.007367    13.35846
     maind_I |   2.131314    .778013     2.07   0.038     1.042139    4.358824
     maind_M |   3.278695   1.135978     3.43   0.001     1.662582    6.465752
     maind_N |   8.200988   4.063047     4.25   0.000     3.105647     21.6561
     maind_P |   4.555999   2.141246     3.23   0.001     1.813563     11.4455
     maind_R |   1.605494   1.363245     0.56   0.577     .3039784    8.479585
     maind_Z |   1.287989   .7385596     0.44   0.659      .418616     3.96286
     fac_wet |   2.598561   1.367548     1.81   0.070     .9263389    7.289468
     fac_twt |   1.646302   .8765553     0.94   0.349     .5798243    4.674362
     fac_lbw |   4.308846   2.450853     2.57   0.010     1.413192    13.13774
     fac_gen |   3.922414   1.768501     3.03   0.002     1.620958    9.491504
     fac_far |   1.941012   1.359172     0.95   0.344     .4920211    7.657246
      r_doc1 |    .179788   .0640435    -4.82   0.000     .0894434    .3613874
     r_hdoc1 |   .2539768   .0614143    -5.67   0.000     .1581119    .4079656
       r_hl1 |    .440176   .1154576    -3.13   0.002     .2632432    .7360299
     r_rest1 |   .3713739   .1393674    -2.64   0.008     .1779821    .7749011
     yrsrank |   .9735209   .0223464    -1.17   0.242     .9306934    1.018319
    headuni1 |   1.716676   .3587432     2.59   0.010     1.139746    2.585643
    zapaft92 |   1.379897    .378969     1.17   0.241     .8055199    2.363834
      yrszap |   1.024219   .0235893     1.04   0.299     .9790125    1.071512
     tchload |   .9327812   .0238933    -2.72   0.007     .8871074    .9808065
  cumGOAlag1 |   1.358311   .2685366     1.55   0.121      .921972    2.001156
   cumOTlag1 |   .9820065    .159781    -0.11   0.911     .7138656    1.350866
       avgco |    1.14531   .0595992     2.61   0.009     1.034258    1.268287
      avgcom |   .8945065   .0470872    -2.12   0.034     .8068186    .9917247
    fulltiun |   2.328345   .9560361     2.06   0.040     1.041208    5.206635
------------------------------------------------------------------------------

.                 
. stcox male age maind_B maind_C maind_E maind_G maind_H maind_I maind_M maind_N maind_P maind_R maind_Z fac_wet fac_twt fac_lbw fac_gen f
> ac_far r_doc1 r_hdoc1 r_hl1 r_rest1 yrsrank headuni1 zapaft92 yrszap tchload cumGOAlag1 cumOTlag1 avgco avgcom pubm_pre92h pasttop2y pas
> ttop2ym fulltiun, robust cluster(persnr) /* repeated top: table 2, model 2 */

         failure _d:  h2y == 1
   analysis time _t:  (end-origin)/365.25
             origin:  time max(zapdate,d(01oct1992))
  exit on or before:  finalobs==1
                 id:  persnr

Iteration 0:   log pseudolikelihood = -5607.6663
Iteration 1:   log pseudolikelihood = -5156.5631
Iteration 2:   log pseudolikelihood = -5023.1042
Iteration 3:   log pseudolikelihood = -4953.3337
Iteration 4:   log pseudolikelihood = -4953.0495
Iteration 5:   log pseudolikelihood = -4953.0494
Refining estimates:
Iteration 0:   log pseudolikelihood = -4953.0494

Cox regression -- Breslow method for ties

No. of subjects      =          908                Number of obs   =      5284
No. of failures      =          883
Time at risk         =         5284
                                                   Wald chi2(35)   =    970.12
Log pseudolikelihood =   -4953.0494                Prob > chi2     =    0.0000

                               (Std. Err. adjusted for 908 clusters in persnr)
------------------------------------------------------------------------------
             |               Robust
          _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        male |   2.670972   .7301743     3.59   0.000     1.563051    4.564211
         age |    .955559    .009177    -4.73   0.000     .9377405     .973716
     maind_B |    1.39041     .35821     1.28   0.201     .8391672    2.303759
     maind_C |   2.637516   .5755242     4.44   0.000     1.719717    4.045136
     maind_E |   2.574214   .6669989     3.65   0.000     1.549143    4.277574
     maind_G |   1.772091   .6127617     1.65   0.098     .8998159    3.489943
     maind_H |   3.399071   .8157505     5.10   0.000     2.123628    5.440539
     maind_I |   1.793731   .4054189     2.59   0.010     1.151778    2.793482
     maind_M |   2.361349   .5224318     3.88   0.000     1.530516    3.643195
     maind_N |   2.887934   .9833557     3.11   0.002     1.481661    5.628926
     maind_P |   3.106085   .8648911     4.07   0.000     1.799682    5.360816
     maind_R |   1.987993   .6152359     2.22   0.026     1.083898    3.646206
     maind_Z |   1.493183   .4712741     1.27   0.204      .804376    2.771831
     fac_wet |   1.262626    .513308     0.57   0.566     .5691506    2.801059
     fac_twt |   1.198637   .4832965     0.45   0.653     .5438496    2.641779
     fac_lbw |   2.748136   1.132334     2.45   0.014     1.225495    6.162614
     fac_gen |   2.223126   .8252207     2.15   0.031     1.073989     4.60181
     fac_far |    1.75232   .7329499     1.34   0.180     .7719303    3.977855
      r_doc1 |   .2182062   .0411508    -8.07   0.000     .1507792    .3157858
     r_hdoc1 |   .4212271   .0629252    -5.79   0.000     .3143106    .5645124
       r_hl1 |    .635658   .0805033    -3.58   0.000     .4959324    .8147503
     r_rest1 |   .6404127     .10286    -2.77   0.006     .4674595     .877356
     yrsrank |   .9829454    .011213    -1.51   0.132     .9612121     1.00517
    headuni1 |    1.09057   .0938336     1.01   0.314     .9213307    1.290897
    zapaft92 |    1.39834   .2039551     2.30   0.022     1.050656     1.86108
      yrszap |   1.021971   .0119809     1.85   0.064     .9987569    1.045725
     tchload |   .9908534   .0112963    -0.81   0.420     .9689586    1.013243
  cumGOAlag1 |   .9523258   .0549786    -0.85   0.397     .8504424    1.066415
   cumOTlag1 |   .9362489   .0647322    -0.95   0.341     .8175969     1.07212
       avgco |   1.095603   .0404112     2.48   0.013     1.019194    1.177741
      avgcom |   .9352421   .0349979    -1.79   0.074     .8691027    1.006415
 pubm_pre92h |   1.452723   .1625981     3.34   0.001      1.16657    1.809067
   pasttop2y |   2.412771   .3673247     5.79   0.000     1.790308    3.251656
  pasttop2ym |   .6137636   .0935123    -3.20   0.001     .4553162    .8273498
    fulltiun |    3.05374   1.060979     3.21   0.001     1.545589    6.033511
------------------------------------------------------------------------------

. 
. stcox male age maind_B maind_C maind_E maind_G maind_H maind_I maind_M maind_N maind_P maind_R maind_Z fac_wet fac_twt fac_lbw fac_gen f
> ac_far r_doc1 r_hdoc1 r_hl1 r_rest1 yrsrank headuni1 zapaft92 yrszap tchload cumGOAlag1 cumOTlag1 avgco avgcom pubm_pre92h pasttop2y pas
> ttop2ym fulltiun, shared(persnr) /* repeated top with frailty: table 2, model 3 */

         failure _d:  h2y == 1
   analysis time _t:  (end-origin)/365.25
             origin:  time max(zapdate,d(01oct1992))
  exit on or before:  finalobs==1
                 id:  persnr

Fitting comparison Cox model:

Estimating frailty variance:

Iteration 0:   log profile likelihood = -4946.5769  
Iteration 1:   log profile likelihood = -4946.5769  (backed up)
Iteration 2:   log profile likelihood = -4946.5576  
Iteration 3:   log profile likelihood = -4946.5575  

Fitting final Cox model:

Iteration 0:   log likelihood = -5710.9709
Iteration 1:   log likelihood = -5192.8595
Iteration 2:   log likelihood = -5030.8616
Iteration 3:   log likelihood = -4947.4143
Iteration 4:   log likelihood = -4946.5579
Iteration 5:   log likelihood = -4946.5575
Iteration 6:   log likelihood = -4946.5575
Refining estimates:
Iteration 0:   log likelihood = -4946.5575

Cox regression --
         Breslow method for ties                Number of obs      =      5284
         Gamma shared frailty                   Number of groups   =       908
Group variable: persnr

No. of subjects =          908                  Obs per group: min =         1
No. of failures =          883                                 avg =  5.819383
Time at risk    =         5284                                 max =         9

                                                Wald chi2(35)      =    517.01
Log likelihood  =   -4946.5575                  Prob > chi2        =    0.0000

------------------------------------------------------------------------------
          _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        male |   2.763615   .9869361     2.85   0.004     1.372456    5.564892
         age |   .9466615   .0094479    -5.49   0.000      .928324    .9653612
     maind_B |   1.479294   .4660928     1.24   0.214     .7977371    2.743148
     maind_C |   3.474432   .9770103     4.43   0.000     2.002285     6.02895
     maind_E |   3.213258    1.05883     3.54   0.000     1.684451     6.12961
     maind_G |   2.890926   1.318534     2.33   0.020     1.182522    7.067484
     maind_H |   4.330627   1.478894     4.29   0.000     2.217525    8.457327
     maind_I |   1.982386   .5811878     2.33   0.020     1.115929      3.5216
     maind_M |   2.919823   .8175285     3.83   0.000     1.686656    5.054598
     maind_N |    4.45918   1.881495     3.54   0.000     1.950299    10.19551
     maind_P |   4.302273   1.381068     4.55   0.000     2.293268    8.071257
     maind_R |   2.159217   .8156742     2.04   0.042     1.029776    4.527406
     maind_Z |   1.785476   .5814005     1.78   0.075      .943147    3.380095
     fac_wet |    1.25728   .4687934     0.61   0.539     .6054114    2.611042
     fac_twt |   1.246468   .4805412     0.57   0.568     .5854962    2.653617
     fac_lbw |   3.124211   1.224085     2.91   0.004     1.449553    6.733586
     fac_gen |   2.661656   .8480922     3.07   0.002      1.42538    4.970191
     fac_far |   2.135059    .862526     1.88   0.060     .9672521    4.712813
      r_doc1 |   .1886045   .0415003    -7.58   0.000     .1225335    .2903015
     r_hdoc1 |   .3597335   .0585203    -6.28   0.000     .2615232    .4948249
       r_hl1 |   .5478633   .0772827    -4.27   0.000     .4155277    .7223447
     r_rest1 |   .5526503   .1028604    -3.19   0.001     .3837275    .7959354
     yrsrank |   .9734222   .0142992    -1.83   0.067     .9457958    1.001856
    headuni1 |    1.11095   .1119866     1.04   0.297     .9117822    1.353623
    zapaft92 |   1.380656   .2303838     1.93   0.053     .9955185    1.914792
      yrszap |   1.031839   .0163743     1.98   0.048      1.00024    1.064437
     tchload |   .9813603   .0145543    -1.27   0.205      .953245    1.010305
  cumGOAlag1 |   .9743925   .0774793    -0.33   0.744     .8337775    1.138722
   cumOTlag1 |   .9854149    .080446    -0.18   0.857      .839711    1.156401
       avgco |   1.106352   .0716526     1.56   0.119     .9744636    1.256092
      avgcom |   .9306837   .0606533    -1.10   0.270     .8190845    1.057488
 pubm_pre92h |   1.840613   .2679518     4.19   0.000     1.383715    2.448376
   pasttop2y |   2.225058   .4652975     3.82   0.000     1.476864    3.352293
  pasttop2ym |   .6121717   .1283955    -2.34   0.019     .4058301    .9234264
    fulltiun |   2.950127   .7917479     4.03   0.000     1.743401     4.99211
-------------+----------------------------------------------------------------
       theta |   .3999591   .1656104
------------------------------------------------------------------------------
Likelihood-ratio test of theta=0: chibar2(01) =    12.98 Prob>=chibar2 = 0.000

Note: standard errors of hazard ratios are conditional on theta.

. 
. log close
      name:  <unnamed>
       log:  C:\Users\Stijn\Documents\_Projects_\Research\Papers\Prestatieanalyse\Persistence_in_Top\Analyse\130401_ReStat_scripts_data\su
> bmitted_to_ReStat\pubanalysis.log
  log type:  text
 closed on:   8 Apr 2013, 14:01:21
------------------------------------------------------------------------------------------------------------------------------------------
